package es.ats.codington.festival.interfaces.daos;


import java.sql.SQLException;
import java.util.ArrayList;
import es.ats.codington.festival.domain.Event;
import es.ats.codington.festival.domain.Visitor;
import es.ats.codington.festival.exceptions.DAOException;

public interface IVisitorDAO {
	
	/**
     * This method changes password of the visitor 
     * 
     * @param visitor type Visitor.
     * @return Return a boolean if the password has been changed.
     */
	public int updateVisitorPasswordById(Visitor visitor); //throws FERSGenericException;	
	
	/**
     * This method creates a new visitor 
     * 
     * @param visitor type Visitor.
     * @return Return a boolean if the visitor has been changed.
     */


	public boolean createVisitor(Visitor visitor) throws DAOException, SQLException;

	
	
	/**
     * This method check a login visitor 
     * 
     * @param visitor.
     * @return Return a boolean if the visitor is loged
     */
	public boolean checkLoginVisitor(Visitor visitor);

	
	/**
     * This method search a visitor with the name of the visitor
     * 
     * @param A String
     * @return Return a boolean if the password has been changed.
     */
	public Visitor searchVisitor(String username) throws DAOException;
	
	
	/**
     * This method show Registered Events.
     * 
     * @param visitor type Visitor
     * @return A ArrayList of events
     */
	public ArrayList<Event> showRegisteredEvents(Visitor visitor);
	
	
	
	/**
	 * This method update the first name of a visitor
	 * @param visitor
	 * @return status
	 */
	
	public int updateVisitorFirstNameById(Visitor visitor);
	
	/**
	 * This method update the last name of a visitor
	 * @param visitor
	 * @return status
	 */
	
	public int updateVisitorLastNameById(Visitor visitor);
	
	/**
	 * This method update the email of a visitor
	 * @param visitor
	 * @return status
	 */
	
	public int updateVisitorEmailAddressById(Visitor visitor);
	
	/**
	 * This method update the last name of a visitor
	 * @param visitor
	 * @return status
	 */
	
	public int updateVisitorPhoneNumberById(Visitor visitor);
	
	/**
	 * This method update the last name of a visitor
	 * @param visitor
	 * @return status
	 */
	
	public int updateVisitorNifById(Visitor visitor);
	
	
	
}
